<%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ page import="entity.Owner" %>
        <html>

        <head>
            <title>物业管理系统</title>
            <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
            <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css" rel="stylesheet">
            <style>
                body {
                    background-color: #f8f9fa;
                    padding-top: 2rem;
                }

                .card {
                    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
                    border: none;
                    margin-bottom: 1.5rem;
                }

                .menu-item {
                    text-decoration: none;
                    color: #333;
                    transition: all 0.3s;
                }

                .menu-item:hover {
                    transform: translateY(-3px);
                }

                .menu-icon {
                    font-size: 2rem;
                    margin-bottom: 0.5rem;
                }
            </style>
        </head>

        <body>
            <% Owner owner=(Owner) session.getAttribute("owner"); if (owner==null) { response.sendRedirect("login.jsp");
                return; } %>

                <div class="container">
                    <div class="row justify-content-center">
                        <div class="col-md-8">
                            <div class="card mb-4">
                                <div class="card-body">
                                    <h2 class="card-title text-center mb-4">欢迎回来，<%= owner.getName() %>
                                    </h2>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <p><i class="bi bi-building"></i> 楼号：<%= owner.getBuilding() %>
                                            </p>
                                            <p><i class="bi bi-house-door"></i> 单元号：<%= owner.getUnit() %>
                                            </p>
                                            <p><i class="bi bi-door-closed"></i> 房号：<%= owner.getRoom() %>
                                            </p>
                                        </div>
                                        <div class="col-md-6">
                                            <p><i class="bi bi-person"></i> 类型：<%= owner.getType() %>
                                            </p>
                                            <p><i class="bi bi-telephone"></i> 手机号：<%= owner.getPhone() %>
                                            </p>
                                            <% if(owner.getPlateNumber() !=null && !owner.getPlateNumber().isEmpty()) {
                                                %>
                                                <p><i class="bi bi-car-front"></i> 车牌号：<%= owner.getPlateNumber() %>
                                                </p>
                                                <% } %>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="card">
                                <div class="card-body">
                                    <h3 class="card-title text-center mb-4">功能菜单</h3>
                                    <div class="row text-center g-4">
                                        <div class="col-6 col-md-3">
                                            <a href="feeStandard.jsp" class="menu-item d-block">
                                                <i class="bi bi-cash-stack menu-icon d-block"></i>
                                                <span>收费标准</span>
                                            </a>
                                        </div>
                                        <div class="col-6 col-md-3">
                                            <a href="paymentHistory.jsp" class="menu-item d-block">
                                                <i class="bi bi-clock-history menu-icon d-block"></i>
                                                <span>缴费记录</span>
                                            </a>
                                        </div>
                                        <div class="col-6 col-md-3">
                                            <a href="payment.jsp" class="menu-item d-block">
                                                <i class="bi bi-credit-card menu-icon d-block"></i>
                                                <span>在线缴费</span>
                                            </a>
                                        </div>
                                        <!-- 添加余额查询入口 -->
                                        <div class="col-6 col-md-3">
                                            <a href="balance.jsp" class="menu-item d-block">
                                                <i class="bi bi-wallet2 menu-icon d-block"></i>
                                                <span>账户余额</span>
                                            </a>
                                        </div>
                                        <div class="col-6 col-md-3">
                                            <a href="logout" class="menu-item d-block">
                                                <i class="bi bi-box-arrow-right menu-icon d-block"></i>
                                                <span>退出登录</span>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
        </body>

        </html>